// eslint-disable-next-line
import { UserLayout, BasicLayout, BlankLayout } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

const RouteView = {
  name: 'RouteView',
  render: (h) => h('router-view')
}

export const asyncRouterMap = [

  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: '首页' },
    redirect: '/home',
    permission: ['admin'],
    children: [
      // 首页
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/Home/index.vue'),
        funId: "JqRk3qlRSgCvpG",
        meta: { title: '首页', icon: 'apartment', permission: ['admin'] },
      },
      // 信息审核
      {
        path: '/infoVerify',
        name: 'infoVerify',
        component: RouteView,
        funId: "gRjRFCF4FwylF7",
        redirect: '/infoVerify/EnterpriseInfo/list',
        meta: { title: '信息审核管理', icon: 'solution', permission: ['admin'] },
        children: [
          {
            path: '/infoVerify/EnterpriseInfo/index',
            funId: "4GQzsHuaiJvQTJ",
            name: 'EnterpriseInfo',
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            funId: "H58h5kocvkZfAc",
            component: () => import('@/views/infoVerify/EnterpriseInfo/index.vue'),
            meta: { title: '企业信息审核', hideHeader: true, permission: ['admin'] },
            redirect: '/infoVerify/EnterpriseInfo/list',
            children: [
              {
                path: '/infoVerify/EnterpriseInfo/list',
                name: 'EnterpriseInfoList',
                component: () => import('@/views/infoVerify/EnterpriseInfo/EnterpriseInfo.vue'),
                meta: { title: '企业信息审核列表', permission: ['admin'] }
              },
              {
                path: '/infoVerify/Content',
                name: 'Content',
                hidden: false,
                hideChildrenInMenu: false,
                component: () => import('@/views/infoVerify/EnterpriseInfo/Content'),
                meta: { title: '详情', keepAlive: false, permission: ['admin'] }
              },
            ]
          },

          {
            path: '/infoVerify/ProvideTel/index',
            name: 'ProvideTel',
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            funId: "KdG8Kt5fFL4ALN",
            component: () => import('@/views/infoVerify/ProvideTel/index.vue'),
            meta: { title: '资质证明审核', hideHeader: true, permission: ['admin'] },
            redirect: '/infoVerify/ProvideTel/list',
            children: [
              {
                path: '/infoVerify/ProvideTel/list',
                name: 'ProvideTelList',
                component: () => import('@/views/infoVerify/ProvideTel/ProvideTel.vue'),
                meta: { title: '资质证明审核列表', permission: ['admin'] }
              },
              {
                path: '/infoVerify/ProveContent',
                name: 'ProveContent',
                hidden: false,
                hideChildrenInMenu: false,
                component: () => import('@/views/infoVerify/ProvideTel/ProveContent'),
                meta: { title: '资质证明详情', keepAlive: false, permission: ['admin'] }
              },

            ]
          },



          {
            path: '/infoVerify/HornorProve/index',
            name: 'HornorProve',
            funId: "yVSRlCf7YelXVw",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/infoVerify/HornorProve/index.vue'),
            meta: { title: '荣誉奖项审核', hideHeader: true, permission: ['admin'] },
            redirect: '/infoVerify/HornorProve/list',
            children: [
              {
                path: '/infoVerify/HornorProve/list',
                name: 'HornorProveList',
                component: () => import('@/views/infoVerify/HornorProve/HornorProve.vue'),
                meta: { title: '荣誉奖项审核列表', permission: ['admin'] }
              },
              {
                path: '/infoVerify/HornorAwards',
                name: 'HornorAwards',
                hidden: false,
                hideChildrenInMenu: false,
                component: () => import('@/views/infoVerify/HornorProve/HornorAwards'),
                meta: { title: '荣誉奖项', keepAlive: false, permission: ['admin'] }
              },

            ]
          },

          {
            path: '/infoVerify/ProveInfo/index',
            name: 'ProveInfo',
            funId: "Wr0NIW81Z3Pcc8",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/infoVerify/ProveInfo/index.vue'),
            meta: { title: '产品供应信息审核', hideHeader: true, permission: ['admin'] },
            redirect: '/infoVerify/ProveInfo/list',
            children: [
              {
                path: '/infoVerify/ProveInfo/list',
                name: 'ProveInfoList',
                component: () => import('@/views/infoVerify/ProveInfo/ProveInfo.vue'),
                meta: { title: '产品供应信息审核列表', permission: ['admin'] }
              },
              {
                path: '/infoVerify/ProductInfo',
                name: 'ProductInfo',
                hidden: false,
                hideChildrenInMenu: false,
                component: () => import('@/views/infoVerify/ProveInfo/ProductInfo.vue'),
                meta: { title: '产品基本信息', permission: ['admin'] }
              },

            ]
          },

          {
            path: '/infoVerify/NeedInfo/index',
            name: 'NeedInfo',
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            funId: "AYLPHvYzIitFZL",
            component: () => import('@/views/infoVerify/NeedInfo/index.vue'),
            meta: { title: '产品需求信息审核', hideHeader: true, },
            redirect: '/infoVerify/NeedInfo/list',
            children: [
              {
                path: '/infoVerify/NeedInfo/list',
                name: 'NeedInfoList',
                component: () => import('@/views/infoVerify/NeedInfo/NeedInfo.vue'),
                meta: { title: '产品需求审核列表', permission: ['admin'] }
              },
              {
                path: '/infoVerify/VerifyInfo',
                name: 'VerifyInfo',
                hidden: false,
                hideChildrenInMenu: false,
                component: () => import('@/views/infoVerify/NeedInfo/VerifyInfo.vue'),
                meta: { title: '产品审核基本信息', permission: ['admin'] }
              },

            ]
          },

          {
            path: '/SolutioninfoVerify/Solution/index',
            name: 'SolutionInfo',
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            funId: "IHI-CmP1sFcQ1E",
            component: () => import('@/views/infoVerify/Solution/index.vue'),
            meta: { title: '解决方案信息审核', hideHeader: true, },
            redirect: '/SolutioninfoVerify/Solution/list',
            children: [
              {
                path: '/SolutioninfoVerify/Solution/list',
                name: 'SolutionInfoList',
                component: () => import('@/views/infoVerify/Solution/SolutionInfo.vue'),
                meta: { title: '解决方案审核列表', permission: ['admin'] }
              },
              {
                path: '/SolutioninfoVerify/VerifyInfo',
                name: 'SolutionVerifyInfo',
                hidden: false,
                hideChildrenInMenu: false,
                component: () => import('@/views/infoVerify/Solution/VerifyInfo.vue'),
                meta: { title: '解决方案审核基本信息', permission: ['admin'] }
              },

            ]
          },
          {
            path: '/infoVerify/CooperationContent/index',
            name: 'CooperationContent',
            funId: "CwqYv1r1bghMUo",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/infoVerify/CooperationContent/index.vue'),
            meta: { title: '招商信息审核', hideHeader: true, permission: ['admin'] },
            redirect: '/infoVerify/CooperationContent/list',
            children: [
              {
                path: '/infoVerify/CooperationContent/list',
                name: 'CooperationContentList',
                component: () => import('@/views/infoVerify/CooperationContent/CanvassInfo.vue'),
                meta: { title: '招商信息审核列表', permission: ['admin'] }
              },
              {
                path: '/infoVerify/CooperationContent',
                name: 'CooperationContentInfo',
                hidden: false,
                hideChildrenInMenu: false,
                component: () => import('@/views/infoVerify/CooperationContent/CooperationContent.vue'),
                meta: { title: '招商信息审核', permission: ['admin'] }
              },

            ]
          },


          {
            path: '/infoVerify/ZBCooperationContent/index',
            name: 'ZBCooperationContent',
            funId: "siB2ZM0AUq3Hev",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/infoVerify/ZBCooperationContent/index.vue'),
            meta: { title: '招标信息审核', hideHeader: true, permission: ['admin'] },
            redirect: '/infoVerify/ZBCooperationContent/list',
            children: [
              {
                path: '/infoVerify/ZBCooperationContent/list',
                name: 'ZBCooperationContentList',
                component: () => import('@/views/infoVerify/ZBCooperationContent/CanvassInfo.vue'),
                meta: { title: '招标信息审核列表', permission: ['admin'] }
              },
              {
                path: '/infoVerify/ZBCooperationContent',
                name: 'ZBCooperationContentInfo',
                hidden: false,
                hideChildrenInMenu: false,
                component: () => import('@/views/infoVerify/ZBCooperationContent/CooperationContent.vue'),
                meta: { title: '招标信息审核', permission: ['admin'] }
              },

            ]
          },

        ]
      },
      // 产品关联管理
      {
        path: '/proManage',
        name: 'proManage',
        component: RouteView,
        redirect: '/proManage/ProSort',
        funId: "4GQzsHuaiJvQTJ",
        meta: { title: '产品关联管理', icon: 'apartment', permission: ['admin'] },
        children: [
          {
            path: '/proManage/ProSort/:pageNo([1-9]\\d*)?',
            name: 'ProSort',
            funId: "FbEj1F6SDIhbXd",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/proManage/ProSort'),
            meta: { title: '产品分类管理', permission: ['admin'] }
          }
        ]
      },
      // 推送管理
      {
        path: '/sendManage',
        name: 'sendManage',
        component: RouteView,
        redirect: '/sendManage/InfoSystem',
        funId: "ni4XuC3jeHcDqc",
        meta: { title: '推送管理', icon: 'appstore', permission: ['admin'] },
        children: [
          {
            path: '/sendManage/InfoSystem/:pageNo([1-9]\\d*)?',
            name: 'InfoSystem',
            funId: "Wrr8tZqNw1SBTv",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/sendManage/InfoSystem'),
            meta: { title: '系统消息推送', permission: ['admin'] },
          },
          {
            path: '/sendManage/ActivityManage/:pageNo([1-9]\\d*)?',
            name: 'ActivityManage',
            funId: "xP7oiWE6z2y6qR",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/sendManage/ActivityManage'),
            meta: { title: '通知公告管理', permission: ['admin'] },
          },
          {
            path: '/sendManage/EntPushManage',
            name: 'EntPushManage',
            funId: "xP7oiWE6z4y6TR",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/sendManage/EntPushManage'),
            meta: { title: '企业推送管理', permission: ['admin'] }
          }
        ]
      },
      // 系统设置
      {
        path: '/system',
        name: 'system',
        component: RouteView,
        redirect: '/system/usermanage',
        funId: "ni4XuC3jeHcDqc",
        meta: { title: '系统设置', icon: 'appstore', permission: ['admin'] },
        children: [
          {
            path: '/system/usermanage',
            name: 'usermanage',
            funId: "Wrr8tZqNw1SBTv",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/system/a'),
            meta: { title: '用户管理', permission: ['admin'] },
          },
          {
            path: '/system/auth',
            name: 'auth',
            funId: "xP7oiWE6z2y6qR",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/system/b'),
            meta: { title: '权限管理', permission: ['admin'] },
          },
          {
            path: '/system/log',
            name: 'log',
            funId: "xP7oiWE6z4y6TR",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/system/c'),
            meta: { title: '日志管理', permission: ['admin'] }
          }
        ]
      },
      // 企业档案
      {
        path: '/companydangan',
        name: 'companydangan',
        component: RouteView,
        redirect: '/companydangan/a',
        funId: "ni4XuC3jeHcDqc",
        meta: { title: '企业档案', icon: 'appstore', permission: ['admin'] },
        children: [
          {
            path: '/companydangan/a',
            name: 'companydangana',
            funId: "Wrr8tZqNw1SBTv",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/companydangan/a'),
            meta: { title: '企业信息库', permission: ['admin'] },
          },
          {
            path: '/companydangan/b',
            name: 'companydanganb',
            funId: "Wrr8tZqNw1SBTv",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/companydangan/b'),
            meta: { title: '关系网络管理', permission: ['admin'] },
          },
        ]
      },
      // 金融服务
      {
        path: '/jinrongfuwu',
        name: 'jinrongfuwu',
        component: RouteView,
        redirect: '/jinrongfuwu/a',
        funId: "ni4XuC3jeHcDqc",
        meta: { title: '金融服务', icon: 'appstore', permission: ['admin'] },
        children: [
          {
            path: '/jinrongfuwu/a',
            name: 'jinrongfuwua',
            funId: "Wrr8tZqNw1SBTv",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/jinrongfuwu/a'),
            meta: { title: '产品管理', permission: ['admin'] },
          },
          {
            path: '/jinrongfuwu/b',
            name: 'jinrongfuwub',
            funId: "Wrr8tZqNw1SBTv",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/jinrongfuwu/b'),
            meta: { title: '工单管理', permission: ['admin'] },
          },
        ]
      },
      // 问题反馈
      {
        path: '/Feedback',
        name: 'Feedback',
        component: RouteView,
        redirect: '/Feedback/InfoSystem',
        funId: "ni4XuC3jeHcDqc1444",
        meta: { title: '问题反馈', icon: 'appstore', permission: ['admin'] },
        children: [
          {
            path: '/Feedback/InfoSystem',
            name: 'FeedbackInfoSystem',
            funId: "Wrr8tZqNw1SBTv2222",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/Feedback/InfoSystem'),
            meta: { title: '问题反馈', permission: ['admin'] },
          },

        ]
      },
      // 统计分析管理
      {
        path: '/countAnalyse',
        name: 'countAnalyse',
        component: RouteView,
        redirect: '/countAnalyse/SupplyAnalyse',
        funId: "uWx04MjvIla8rk",
        meta: { title: '数据驾驶舱', icon: 'calculator' },
        children: [
          {
            path: '/countAnalyse/SupplyAnalyse/:pageNo([1-9]\\d*)?',
            name: 'SupplyAnalyse',
            funId: "P9SLVhNr8x4XMe",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/countAnalyse/SupplyAnalyse'),
            meta: { title: '数据统计分析', permission: ['admin'] }
          },
          {
            path: '/countAnalyse/SupplyAnalyse',
            name: 'SupplyAnalysea',
            funId: "P9SLVhNr8x4XMe",
            hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
            component: () => import('@/views/countAnalyse/a'),
            meta: { title: '数据查询', permission: ['admin'] }
          },
          // {
          //   path: '/countAnalyse/LayoutAnalyse',
          //   name: 'LayoutAnalyse',
          //   funId: "X9SrOLDDF6ky88",
          //   hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
          //   component: () => import('@/views/countAnalyse/LayoutAnalyse'),
          //   meta: { title: '全区企业分布情况统计', permission: ['admin'] }
          // },
          // {
          //   path: '/countAnalyse/BasicAnalyse',
          //   name: 'BasicAnalyse',
          //   funId: "gBjJXGEnpXoTf6",
          //   hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
          //   component: () => import('@/views/countAnalyse/BasicAnalyse'),
          //   meta: { title: '供需系统基本流量统计', permission: ['admin'] }
          // }
        ]
      },

    ]
  },
  {
    path: '*', redirect: '/404', hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      },
      {
        path: 'register',
        name: 'register',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
      },
      {
        path: 'register-result',
        name: 'registerResult',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
      },

      {
        path: 'recover',
        name: 'recover',
        component: undefined
      }
    ]
  },
  {
    path: '/newhome',
    component: () => import('@/views/Home/index.vue'),
  },
  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  }

]
